import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import './assets/css/style.css'
Vue.use(ElementUI)
Vue.config.productionTip = false

import Tilte from './components/public/title.vue'
Vue.component("crumb",Tilte)

import Moment from 'moment'
Vue.filter('formatDate', function(value) {
  return Moment(value).format('YYYY-MM-DD HH:mm:ss')
})

import VueQuillEditor from 'vue-quill-editor'

// require styles
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

Vue.use(VueQuillEditor)

// import instance from './utis/request'
// Vue.prototype.myaxios=instance

import axios from "axios"
axios.defaults.baseURL = 'http://122.112.253.28:8888/api/private/v1/'; 
import ZkTable from 'vue-table-with-tree-grid';
Vue.use(ZkTable);

axios.interceptors.request.use((config) => {
  if (config.url != 'login') {
    const token = localStorage.getItem('token')
    config.headers.Authorization = token
  }
  return config
})

Vue.prototype.myaxios = axios
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
